package com.dotflat.training.domain;

import com.dotflat.rest.domain.AreableObjectBase;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * OfflineTrainingCourse
 * OT  == OfflineTraining
 */

@Entity
@Table(name = "ot_course")
@Data
@EqualsAndHashCode(callSuper = true)
public class OTCourse extends AreableObjectBase {

	@Column(columnDefinition = "bit(1) DEFAULT 0 COMMENT '是否开放' ", nullable = false)
	private Boolean published = true;

	@Column(columnDefinition = " varchar(50)  COMMENT '名称'")
	private String title;

	@Column(name = "cover", columnDefinition = "varchar(255)  COMMENT '封面'")
	private String cover="";

	@Column(columnDefinition = "datetime DEFAULT NOW() COMMENT '开始日期'")
	private Date beginAt;

//	@Column(columnDefinition = "varchar(30) COMMENT '资源类型， 0. 其他    1.图片   2.视频'")
//	private String resType;

	@Column(columnDefinition = "int default 0 COMMENT '开课状态，0.预约中  1.签到中  2.已结束'")
	private Integer status;

	@Column(columnDefinition = "varchar(10) default '预约中' COMMENT '开课状态，0.预约中  1.签到中  2.已结束'")
	private String statusVal;

	@Column(columnDefinition = "int default 0 COMMENT '查看者数量'")
	private Integer visitorCount;

	@Column(columnDefinition = "varchar(512) COMMENT '简介'")
	private String shortDesc;

	@Column(columnDefinition = "longtext  COMMENT '内容'")
	private String content;

	@Column(columnDefinition = " varchar(32)  COMMENT '上传老师名字'")
	private String staffName;

	@Column(columnDefinition = " varchar(255)  COMMENT '上传老师头像'")
	private String staffHeadImg;

	@Transient
	private Boolean booked;

}
